-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add master referenced id/uri audio playlists. Add playlists to hls media groups #1124
Conversation
06c7bfc
to
1a109dd
Compare
Codecov Report
@@ Coverage Diff @@
## main #1124 +/- ##
==========================================
+ Coverage 86.15% 86.19% +0.04%
==========================================
Files 39 39
Lines 9254 9281 +27
Branches 2115 2126 +11
==========================================
+ Hits 7973 8000 +27
Misses 1281 1281
Continue to review full report at Codecov.
|
1a109dd
to
caf93d6
Compare
20fe047
to
a771af2
Compare
src/manifest.js
Outdated
properties.playlists.forEach(function(p, i) { | ||
const id = createPlaylistID(i, groupId); | ||
|
||
p.uri = p.uri || id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is p.uri
expected to be the groupId
(what used to be called phonyUri
)?
Should uri
continue to be set to groupId
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that we can have more than 1 playlist in a group the groupId alone would conflict
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonder how big of an issue this is, since, it's potentially breaking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we could keep playlist at index 0 as groupId
, and use all others as id
, then deprecate using it like this. Ideally we would do away with array/uri/id object thing we have right now.
b59673d
to
a771af2
Compare
if (!properties.playlists || !properties.playlists.length) { | ||
properties.playlists = [Object.assign({}, properties)]; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may impact this check:
http-streaming/src/media-groups.js
Line 471 in 552b012
} else if (properties.playlists && sourceType === 'dash') { |
Which looks for the existence of playlists.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might be okay since it is looking for dash sourceType specifically here and those will always have playlists. It does change our notions around a bit though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If DASH always has playlists
in this case, I wonder why I included that case at all back when.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe it didn't at the time this was added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be worth us putting a TODO on that other line just so we don't forget to look into it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Might be worth adding tests around addPropertiesToMaster
for media group IDs.
if (!properties.playlists || !properties.playlists.length) { | ||
properties.playlists = [Object.assign({}, properties)]; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be worth us putting a TODO on that other line just so we don't forget to look into it.
Fixes issues with rendition switching on audio only hls media.